/*
//轮播
var mySwiper = new Swiper ('.swiper-container', {
    loop: true, // 循环模式选项
    autoplay:true,//自动轮播

    // 如果需要分页器
    pagination: {
        el: '.swiper-pagination'
    },

    // 如果需要前进后退按钮
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev'
    }
});


/*
//选项卡
var xxk1 = document.querySelector("#xxk1");
var xxk2 = document.querySelector("#xxk2");
var xxk3 = document.querySelector("#xxk3");
var j1 = document.querySelector("#j1");
var j2 = document.querySelector("#j2");
var j3 = document.querySelector("#j3");

function an(){
    xxk1.style.display = "block";
    xxk2.style.display = "none";
    xxk3.style.display = "none";
    j2.className = "a4";
    j1.className = "a3";
    j3.className = "a4";
}

function ann(){
    xxk2.style.display = "block";
    xxk1.style.display = "none";
    xxk3.style.display = "none";

    j2.className = "a3";
    j1.className = "a4";
    j3.className = "a4";
}

function a(){
    xxk3.style.display = "block";
    xxk1.style.display = "none";
    xxk2.style.display = "none";

    j2.className = "a4";
    j1.className = "a4";
    j3.className = "a3";
}
*/


/*
var span1 = document.querySelectorAll('.main2-2 > span > a');
var div1 = document.querySelectorAll('.main-z > div');
    for(var i=0 ; i<span1.length ; i++){
        span1[i].index = i;
        span1[i].addEventListener('click',function(){
            for (var j=0 ; j<span1.length ; j++){
                span1[j].classList.remove("a3");
                div1[j].classList.remove("active1");
            }
            this.classList.add("a3");
            div1[this.index].classList.add("active1");
        })
    }



new Vue({
    el:"#xxk1",
    data:{
        an:[
            {l:"images/images1/1.jpg",p:"天翼系列",span:"2680.00"},
            {l:"images/images1/2.jpg",p:"臻典系列",span:"4180.00"},
            {l:"images/images1/3.jpg",p:"天翼系列",span:"2580.00"},
            {l:"images/images1/4.jpg",p:"天翼系列",span:"980.00"},
            {l:"images/images1/5.jpg",p:"臻典系列",span:"4180.00"}
        ]
    }
});



new Vue({
    el:"#wn1",
    data:{an:""},
    mounted(){
        axios
            .get('json/json.json')
            .then(response => this.an = response.data.urls)
    .catch(function(error){
            console.log(error);
        })
    }


});

new Vue({
    el:"#wn2",
    data:{an1:""},
    mounted(){
        axios
            .get('json/json.json')
            .then(response => this.an1 = response.data.ul)
            .catch(function(error){
                console.log(error);
            })
    }


});

//男表js
new Vue({
    el:"#ui",
    data:{an2:""},
    mounted(){
        axios
            .get('json/json.json')
            .then(response => this.an2 = response.data.pp)
            .catch(function(error){
                console.log(error);
            })
    }


});





//女表js
new Vue({
    el:"#ui1",
    data:{an3:""},
    mounted(){
        axios
            .get('json/json.json')
            .then(response => this.an3 = response.data.pp1)
            .catch(function(error){
                console.log(error);
            })
    }


});





//情侣腕表
new Vue({
    el:"#ui2",
    data:{an4:""},
    mounted(){
        axios
            .get('json/json.json')
            .then(response => this.an4 = response.data.pp2)
            .catch(function(error){
                console.log(error);
            })
    }


});




//返回顶部
var kk1 = document.querySelector("#kk1");

var ee1 = document.querySelector("#ee1");


//滚动事件，没触发一次，这个事件就执行一次。
window.onscroll = function(){

    //判断他离顶部的距离
    if (document.documentElement.scrollTop > 300 || document.body.scrollTop > 300){
        kk1.style.display = "block";
    }
    else {
        kk1.style.display = "none";
    }



    if (document.documentElement.scrollTop > 225 || document.body.scrollTop > 225){
        ee1.style.position = "fixed";
        ee1.style.top = "0";
    }else {
        ee1.style.position = "relative";
    }
};


kk1.addEventListener('click',function(){
    //距离顶部的距离为x为0，y为0.
    window.scrollTo(0,0);


    //window.scrollTo({
    //    top: 0 ,
    //    behavior: 'smooth'
    //})

});

*/





















